![]() |
OPC-UA Embedded Server SDK
2.1.0
|
Functions | |
| uint32_t | UAServer_Callback_millisecond (void) |
| int64_t | UAServer_Callback_datetime (void) |
| uint32_t | UAServer_Callback_pseudeo_random_number (void) |
| void * | UAServer_Callback_memcpy (void *destination, const void *source, size_t num) |
| void * | UAServer_Callback_memchr (const void *ptr, int32_t value, size_t num) |
| void * | UAServer_Callback_memset (void *ptr, int32_t value, size_t num) |
| int | UAServer_Callback_memcmp (const void *ptr1, const void *ptr2, size_t num) |
| char * | UAServer_Callback_strncpy (char *destination, const char *source, size_t num) |
| void * | UAServer_Callback_malloc (size_t size) |
| void | UAServer_Callback_free (void *ptr) |
| uint32_t UAServer_Callback_millisecond | ( | void | ) |
Function provided by host to enable library to time its internal operations
The library requires a millisecond timer in order to operate. This timer is implemented via a uint32_t which increments every millisecond. The host must implement this function as it is called periodically by the stack.
| int64_t UAServer_Callback_datetime | ( | void | ) |
Function provided by host to enable library to obtain current date and time
The library requires the current date and time in order to operate. This timer is implemented via an int64_t which represents UTC time and data in accordance with Windows FILETIME. This is the number of 100ns intervals since January 1, 1601. The host must implement this function as it is called periodically by the library.
| uint32_t UAServer_Callback_pseudeo_random_number | ( | void | ) |
Function provided by host to provide pseudo-random numbers
The library requires a pseudo-random number generator in order to operate. The host must implement this function as it is called periodically by the library.
| void* UAServer_Callback_memcpy | ( | void * | destination, |
| const void * | source, | ||
| size_t | num | ||
| ) |
Function provided by host to provide a memcpy implementation
Some platforms can dramatically improve the performance of memcpy for large data blocks by using DMA or other techniques. If required, a custom implementation may be inserted here. Where a custom implementation is not required simply call the standard library implementation.
Where (UA_INCLUDE_ASYNC_OPS is > 0) this callback may be called on different threads. Ensure you provide whatever locking is necessary for your platform when enabling asynchronous operation.
| [in] | destination | Pointer to the destination array where the content is to be copied, type-casted to a pointer of type void*. |
| [in] | source | Pointer to the source of data to be copied, type-casted to a pointer of type const void*. |
| [in] | num | Number of bytes to copy. size_t is an unsigned integral type. |
| void* UAServer_Callback_memchr | ( | const void * | ptr, |
| int32_t | value, | ||
| size_t | num | ||
| ) |
Function provided by host to provide a memchr implementation
Simply call the standard library implementation.
Where (UA_INCLUDE_ASYNC_OPS is > 0) this callback may be called on different threads. Ensure you provide whatever locking is necessary for your platform when enabling asynchronous operation.
| [in] | ptr | Pointer to the block of memory where the search is performed. |
| [in] | value | Value to be located. The value is passed as an int, but the function performs a byte per byte search using the unsigned char conversion of this value. |
| [in] | num | Number of bytes to be analyzed. size_t is an unsigned integral type. |
| void* UAServer_Callback_memset | ( | void * | ptr, |
| int32_t | value, | ||
| size_t | num | ||
| ) |
Function provided by host to provide a memset implementation
Simply call the standard library implementation.
Where (UA_INCLUDE_ASYNC_OPS is > 0) this callback may be called on different threads. Ensure you provide whatever locking is necessary for your platform when enabling asynchronous operation.
| [in] | ptr | Pointer to the block of memory to fill. |
| [in] | value | Value to be set. The value is passed as an int, but the function fills the block of memory using the unsigned char conversion of this value. |
| [in] | num | Number of bytes to be set to the value. size_t is an unsigned integral type. |
| int UAServer_Callback_memcmp | ( | const void * | ptr1, |
| const void * | ptr2, | ||
| size_t | num | ||
| ) |
Function provided by host to provide a memcmp implementation
Simply call the standard library implementation.
Where (UA_INCLUDE_ASYNC_OPS is > 0) this callback may be called on different threads. Ensure you provide whatever locking is necessary for your platform when enabling asynchronous operation.
| [in] | ptr1 | Pointer to block of memory. |
| [in] | ptr2 | Pointer to block of memory. |
| [in] | num | Number of bytes to compare. |
| char* UAServer_Callback_strncpy | ( | char * | destination, |
| const char * | source, | ||
| size_t | num | ||
| ) |
Function provided by host to provide a strncpy implementation
Simply call the standard library implementation.
Where (UA_INCLUDE_ASYNC_OPS is > 0) this callback may be called on different threads. Ensure you provide whatever locking is necessary for your platform when enabling asynchronous operation.
| [in] | destination | Pointer to the destination array where the content is to be copied. |
| [in] | source | C string to be copied. |
| [in] | num | Maximum number of characters to be copied from source. size_t is an unsigned integral type. |
| void* UAServer_Callback_malloc | ( | size_t | size | ) |
Function provided by host to provide a malloc implementation
Simply call the standard library implementation.
Where (UA_INCLUDE_ASYNC_OPS is > 0) this callback may be called on different threads. Ensure you provide whatever locking is necessary for your platform when enabling asynchronous operation.
| [in] | size | Size of the memory block, in bytes. size_t is an unsigned integral type. |
| void UAServer_Callback_free | ( | void * | ptr | ) |
Function provided by host to provide a free implementation
Simply call the standard library implementation.
Where (UA_INCLUDE_ASYNC_OPS is > 0) this callback may be called on different threads. Ensure you provide whatever locking is necessary for your platform when enabling asynchronous operation.
| [in] | ptr | Pointer to a memory block previously allocated with malloc, calloc or realloc. |